#ifndef PURCHASERECEIPT_H
#define PURCHASERECEIPT_H

#include <QWidget>
#include "purchaseorderform.h"

class Calendar;
class InquireSql;

enum LineEdit{start, end};

namespace Ui {
class PurchaseReceipt;
}

class PurchaseReceipt : public QWidget
{
    Q_OBJECT
    
public:
    explicit PurchaseReceipt(QWidget *parent = 0);
    ~PurchaseReceipt();
    bool eventFilter(QObject *target, QEvent *event);
    void displayTableWidgetPurchaseOrderForm();
    void initLineEditTime();

private slots:
    void slotUpdateLineEditDate(QString);

    void on_pushButtonInquire_clicked();

    void on_comboBox_activated(int index);

    void on_tableWidgetPurchaseOrderForm_cellDoubleClicked(int row, int column);

signals:
    void signalDiaplayPurchaseDetail(QString, PurchaseOrderForm);

private:
    void setQtableWidgetHeaderStyle();    
    void setTableWidgetColor();
    Ui::PurchaseReceipt *ui;
    Calendar *m_calendar;

    InquireSql *m_sql;
    PurchaseOrderFormList m_list;
    int LineEdit;
    bool LineEditEnable;
};

#endif // PURCHASERECEIPT_H
